<?php echo $this->element('displayHeader'); ?>
<fieldset>
    <legend>User Information</legend>
    <table id="formTable">
        <tbody>
            <tr>
                <td width="150px"><?php echo $form->label('User.username') ?></td>
                <td><span><?php echo $this->data['User']['username'] ?></span></td>
            </tr>
            <tr>
                <td><?php echo $form->label('User.name') ?></td>
                <td><span><?php echo $this->data['User']['name'] ?></span></td>
            </tr>
            <tr>
                <td><?php echo $form->label('User.surname') ?></td>
                <td><span><?php echo $this->data['User']['surname'] ?></span></td>
            </tr>
            <tr>
                <td><?php echo $form->label('User.email') ?></td>
                <td><span><?php echo $this->data['User']['email'] ?></span></td>
            </tr>
            <tr>
                <td><?php echo $form->label('User.tel', 'Telephone') ?></td>
                <td><span><?php echo $this->data['User']['tel'] ?></span></td>
            </tr>
        </tbody>
    </table>
</fieldset>
            <?php /*if ($this->data['User']['prefix'] == CUST_PREFIX) : ?>
            <tr>
                <td><?php echo $form->label('UserCustomer.customer_id') ?></td>
                <td><span><?php echo $this->data['Customer']['name'] ?></span></td>
            </tr>
            <tr>
                <td><?php echo $form->label('User_site_id') ?></td>
                <td><span><?php echo $this->data['Site']['name'] ?></span></td>
            </tr>
            <?php endif; ?>

<?php if ($this->data['User']['prefix'] == CUST_PREFIX) : ?>
<fieldset>
    <legend>Privileges</legend>
    <table>
        <tr>
            <td width="150px"><?php echo $form->label(null, 'Head Office'); ?></td>
            <td><span id="headCheckBox"><?php echo $this->data['User']['is_head_user'] == true? 'Yes' : 'No' ?></span></td>
        </tr>
        <tr id="readOnlyRow">
            <td><?php echo $form->label(null, 'Read Only'); ?></td>
            <td><span id="headCheckBox"><?php echo $this->data['User']['read_only'] == true? 'Yes' : 'No' ?></span></td>
        </tr>
        <tr id="viewOtherSiteRow">
            <td><?php echo $form->label(null, 'View Other Sites'); ?></td>
            <td><span id="headCheckBox"><?php echo $this->data['User']['can_view_other_site'] == true? 'Yes' : 'No' ?></span></td>
        </tr>
    </table>
</fieldset>
<?php endif; */?>

<div id="userHistory">
    <?php echo $this->requestAction("/users/history_display/{$this->data['User']['id']}", array('return')); ?>
</div>
<?php echo $form->end(); ?>
